<!--分词测试-->
<div class="col-sm-12" id="app">
	<div class="box box-primary">
		<div class="box-header with-border">
			<h3 class="box-title">分词测试</h3>
			<div class="box-tools">
			<form class="form-inline" onsubmit="return false;">
				<div class="form-group pull-right">
					<div class="input-group">
					<input type="text"  @keyup.enter="submit" v-model="text" value=""
						   class="form-control"
						   placeholder="请输入需要分词的语句..." />
						<div class="input-group-btn">
							<button class="btn btn-primary search-btn" onclick="getText()">
								<i class="glyphicon glyphicon-search"></i>
							</button>
						</div>
					</div>
				</div>
			</form>
			</div>
		</div>
		<!-- /.box-header -->
		<div class="box">
			<div style="margin-left: 20px;">
				<strong v-for="txt in results">
					{{txt}}&nbsp;
				</strong>
				<br />
				<br>
				<br>
				<br>
				<br>
				<br>
			</div>
			<!--</div>-->
		</div>
	</div>
</div>
<script>
	var getText = function () {
        $.ajax({
            type:'post',
            url:'getIKText',
            data:data,
            success:function (result) {
                data.results = [];
                data.results = result;
            }
        });
        return false;
    }
	
	var data = {
	    text:'',
		results:[]
	}


    new Vue({
    	el:"#app",
		data:data,
		methods:{
            submit:function () {
                getText();
            }
		}
	})


</script>